<!DOCTYPE html>
<html>
<head>
	<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no" />
	<meta content="yes" name="apple-mobile-web-app-capable" />
	<meta content="black" name="apple-mobile-web-app-status-bar-style">
	<meta content="telephone=no" name="format-detection" />
	<meta content="emai=no" name="format-detection" />
	<meta charset="utf-8" />
	<title>基因合成器——宝宝未来干什么？妈宝一起来决定！</title>
	<link rel="stylesheet" type="text/css" href="/baby/css/common.css" />
	<link rel="stylesheet" type="text/css" href="/baby/css/default.css" />
	<script src="/baby/js/zepto-1.1.6.js"></script>
	<script src="/baby/js/fastclick.js"></script>
	<script src="/baby/js/common.js"></script>
	<script src="/baby/js/default.js"></script>
	<script type="text/javascript" src="http://res.wx.qq.com/open/js/jweixin-1.0.0.js"></script>
	<script>
	var _hmt = _hmt || [];
	(function() {
	  var hm = document.createElement("script");
	  hm.src = "//hm.baidu.com/hm.js?19f39b206aedf768b42fbc69e4e4f721";
	  var s = document.getElementsByTagName("script")[0]; 
	  s.parentNode.insertBefore(hm, s);
	})();
	</script>
</head>
<body>
	<header>
		<img src="/baby/img/h_default.png" alt="基因合成器——宝宝未来干什么？妈宝一起来决定！" />
	</header>
	<section class="main">
		<input type="hidden" name="uniqid" id="uniqid" value="<?php echo $uniqid?>">
		<?php if(!$baby_nickname):?>
		<div class="input-name">
			<img src="/baby/img/input_name.png" />
			<input type="text" id="name" name="name" data-message="请输入宝宝的昵称！" maxlength="6" />
		</div>
		<?php else:?>
		<div class="input-name saved">
			<img src="/baby/img/input_name_s.png" />
			<p><?php echo $baby_nickname;?></p>
		</div>
		<?php endif;?>
		<div class="container">
			<img class="synthesizer" src="/baby/img/d_synthesizer.png"  data-onhover="touched" />
			<img class="finger-bg" src="/baby/img/d_finger_text.png" />
			<a class="finger left" data-direction="left"></a>
			<a class="finger right" data-direction="right"></a>
			<span class="fingers left"><img src="/baby/img/i_fingers.png" /></span>
			<span class="fingers right"><img src="/baby/img/i_fingers.png" /></span>
			<p class="notice">请分别点击以下指纹按钮</p>
		</div>
		<div class="energy">
			<img src="/baby/img/t_energy.png" /><label><?php echo $play_count?></label>
		</div>
	</section>
	<section class="description">
		<div class="intro">
			<span class="u-bgc">
				<img src="/baby/img/t_hdcy.png" />
			</span>
			<p class="u-bgc">
				妈妈与宝宝（或是爸爸）伸出你们的手指点击1次指纹，系统会根据2位的指纹合成宝宝未来的职业哟！
			</p>
		</div>
		<div class="space clear">
			<img src="/baby/img/i_space.png" />
		</div>
		<div class="rules u-bgc">
			<h2>
				<img src="/baby/img/t_hdgz.png" />
			</h2>
			<p>
				1、“芝士妈妈”每天都会发放3个精力值给你哟，但精力值不会累计，所以快点用完哦！
			</p>
			<p>
				2、你也能通过分享游戏结果给到好友帮忙加精力，每个朋友都能帮你加1点精力！
			</p>
			<p>
				3、精力可以让你玩更多次游戏，那么就能挤进排行榜拿迪士尼门票了呢！
			</p>
		</div>
		<img class="link" data-href="/baby/top?openid=<?php echo $user['openid']?>#prize" src="/baby/img/t_jpy.png" />
	</section>
	<section class="partner">
		<h2>
			<img src="/baby/img/t_partner.png" />
		</h2>
		<div class="list">
			<img src="/baby/img/p_1.jpg" />
			<img data-href="http://wap.syshop.com/?utm_source=baiaimama&utm_medium=wap&utm_term=bamm&utm_content=bamm&utm_campaign=bamm" src="/baby/img/p_3.jpg" />
		</div>
	</section>
	<div class="popup-wrapper share-notice" <?php if($play == 'disabled'):?> style="display: block" <?php endif;?>>
		<div class="popup-bg"  data-cpopup=".share-notice"></div>
		<div class="popup-layout"  data-cpopup=".share-notice">
			<img class="share" src="/baby/img/t_share.png" />
		</div>
	</div>
	<div class="popup-wrapper showTimeout">
		<div class="popup-bg"></div>
		<div class="popup-layout">
			<p><img src="/baby/img/t_hcz.png"/></p>
			<img src="/baby/img/t_3.png" />
			<img src="/baby/img/t_2.png" />
			<img src="/baby/img/t_1.png" />
		</div>
	</div>
	<script type="text/javascript">
    Zepto(function ($) {
        wx.config({
            debug: false,
            appId: '<?php echo $js_config['appId']?>',
            timestamp: <?php echo $js_config['timestamp']?>,
            nonceStr: '<?php echo $js_config['noncestr']?>',
            signature: '<?php echo $js_config['signature']?>',
            jsApiList: [
            	'onMenuShareTimeline',
            	'onMenuShareAppMessage'
            ]
        });
        wx.ready(function () {
        	wx.onMenuShareTimeline({
        	    title: '<?php echo $title?>', // 分享标题
        	    link: '<?php echo $share_url?>', // 分享链接
        	    imgUrl: 'http://wx.zhishimama.com/baby/img/sharelogo.png', // 分享图标
        	    success: function () {
        		    var current = window.location.href;
        	        // 用户确认分享后执行的回调函数
        	        $.ajax({
        				url: "/baby/statistic",
        				data: {url: current, page_id: 1},
        				type: "post",
        				success: function(res){
        				}
        				
        		    });
        	    },
        	    cancel: function () {
        	        // 用户取消分享后执行的回调函数
        	    }
        	});

        	wx.onMenuShareAppMessage({
        	    title: '<?php echo $title?>', // 分享标题
        	    desc: '<?php echo $content?>', // 分享描述
        	    link: '<?php echo $share_url?>', // 分享链接
        	    imgUrl: 'http://wx.zhishimama.com/baby/img/sharelogo.png', // 分享图标
        	    type: 'link', // 分享类型,music、video或link，不填默认为link
        	    dataUrl: '', // 如果type是music或video，则要提供数据链接，默认为空
        	    success: function () {
        	        // 用户确认分享后执行的回调函数
        	    	var current = window.location.href;
        	        // 用户确认分享后执行的回调函数
        	        $.ajax({
        				url: "/baby/statistic",
        				data: {url: current, page_id: 1},
        				type: "post",
        				success: function(res){
        				}
        				
        		    });
        	    },
        	    cancel: function () {
        	        // 用户取消分享后执行的回调函数
        	    }
        	});
        });
    })
	
	</script>
</body>
</html>
